package com.loubobooo.personal.blog.mapper.custom;

import com.loubobooo.personal.blog.entity.Tag;
import com.loubobooo.personal.blog.entity.vo.ArticleVO;
import com.loubobooo.personal.blog.entity.vo.TagVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TagMapperCustom {
    //获得标签总数
    public Integer countTag(@Param(value = "status") Integer status);

    //获得标签列表
    public List<TagVO> listTag(@Param(value = "status") Integer status);

    //获得带有该标签的文章列表
    public List<ArticleVO> listArticleWithTagByPage(@Param(value = "status") Integer status,
            @Param(value = "tagId") Integer tagId, @Param(value = "startPos") Integer startPos,
            @Param(value = "pageSize") Integer pageSize);

    //根据标签名获取标签
    public Tag getTagByName(String name);

}
